1. Field of the Invention
The present invention relates generally to the process of detecting a correction object when performing local color correction on a photographic image, and more particularly to a red-eye detection device, a red-eye detection method, and a red-eye detection program that detect red parts from a photographic image in which eyes are photographed red.
2. Description of the Related Art
If a flash photograph of a person or animal is taken at night or in poor light, there are cases where the pupil (or part of the pupil) will be photographed as red or gold. For this reason, a variety of methods have been proposed in which the pupil photographed as red or gold (hereinafter referred to as a red-eye, including the case of gold) is corrected to the original color, by digital image processing.
For example, Japanese Unexamined Patent Publication No. 2000-013680 discloses a method of and a device for automatically recognizing a red-eye from among regions specified by an operator, based on the color, position, and size of the pupil. Also, Japanese Unexamined Patent Publication No. 2001-148780 discloses a method of calculating a predetermined feature quantity of each pixel for a region specified by an operator and selecting as a correction object a part that has the most distinguishing feature of the pupil. However, in the recognition process based on only features of the pupil, it is difficult to discriminate a locally reddish object such as a red electrical decoration from a red-eye. Because of this, it is extremely difficult to automatically perform all operations without human intervention by an operator.
In contrast with this, a method of automatically detecting a red-eye is shown in U.S. Pat. No. 6,252,976 (corresponding to Japanese Publication No. 2000-125320). In this method, a face is detected and, based on features of the face, a pair of the right eye and the left eye is specified from among detected red-eye candidates. Then, based on the features of the face, it is evaluated whether or not the pair meets conditions of a red-eye. For instance, since a distance between both eyes is obtained from the size of the face, the upper limit of the size of the pupil is estimated from that distance, and it is confirmed that the size of a red-eye candidate detected does not exceed the upper limit. In this manner, accuracy of detection is enhanced. This method is effective when both eyes are red-eyes.
However, the phenomenon of a red-eye does not necessarily occur in both eyes. There are cases in which only one eye becomes a red-eye. In addition, when both eyes are red-eyes, there are cases where only one of the two eyes is detected as a red-eye candidate.
In the method disclosed in U.S. Pat. No. 6,252,976, the evaluation of whether candidates meet conditions of a red-eye cannot be performed on red-eye candidates not specified as a pair. In this case, the judgment of whether to make a correction must be performed based on the result of detection, whose accuracy is low. As a result, objects other than a red-eye will be corrected. Also, when both eyes are red-eyes, only one eye will be corrected.